<!-- <style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style> -->
<template src="./index.html"></template>
<script>
    import Edit from "./../edit/index";
    export default {
        mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Page, Vue.prototype.$vFN.Mixins.Table],
        data() {
            return {
                appWindow: window,
                // 页面接口地址
                apiUrl: {
                    list: "admin/menu/index",
                    delete: "admin/menu/del",
                },
                // 表格查询数据
                mixinTable_tableSearchData: {
                    menu_type: "",
                    type: "2",
                },
                // 表格数据
                tableData: [],
                // 表格数据删除展示结构
                tableDeleteConfig: {
                    columns: [{
                            label: "菜单名称",
                            prop: "menu_title"
                        },
                        {
                            label: "前端标识",
                            prop: "auth_name",
                            width:300,
                        },
                        {
                            label: "菜单图标",
                            prop: "menu_icon",
                            type: "icon"
                        },
                        // {
                        //     label: "菜单分类",
                        //     prop: "menuTypeMap.dictLabel"
                        // },
                       
                        {
                            label: "备注信息",
                            prop: "remark"
                        },
                    ],
                    // title: "确定停用以下内容么?",
                },
                // 表格数据类型
                mixinTable_tableDataType: "tree",


                // 数据字典
                // 菜单类型
                dict_menu_type: [],

            };
        },
        methods: {
             // 初始化
            async init() {
                
                // 数据字典 运营状态
                // this.mixinTable_tableSearchData.dict_menu_type = await this.mixinBase_configDict({
                //     type: "menu_type",
                //     name: "dict_menu_type",
                // });
                // this.mixinEdit_editBoxInit({
                //     model: "form",
                //     id: this.id,
                // })
                this.mixinTable_refreshData();
            },
         

            // 打开添加/修改
            editBoxOpen(params_) {
                console.error("params_",params_)
                let _d = {
                    mixinEdit_parent: this,
                    mixinEdit_editType: params_.type,
                    id: params_.id,
                   
                }
                if (params_.parent_id) {
                    _d.parent_id = params_.parent_id
                }
                Edit.init(_d)

                // Edit.init({
                //     mixinEdit_editType: params_.type,
                //     id: params_.id,
                //     parent_id: params_.id,
                // })
            },
           
            

        },
        mounted() {
            this.init();

        },
        activated() {},
    };
</script>